<template>
<div id="carousel">
  <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
    <van-swipe-item v-for="(item,i) of carousel1" :key="i">
      <img :src="carousel1Img" alt="">
    </van-swipe-item>
  </van-swipe>
  <router-link to="/">
      <img src="../assets/img/carousel-down.png" alt="">
  </router-link>
  </div>
</template>
<script>
export default {
  data() {
    return {
        swipe:{},
        carousel1:["0.jpg","1.jpg","2.jpg","3.jpg","4.jpg","5.jpg"],
    };
  },
  mounted(){
    this.carousel1.forEach(item=>{
      carousel1Img=require(`../assets/carousal1/${item}`)
    })
  }
};
</script>
<style>
.my-swipe {
  margin-top: 54px;
  background-color: #fff;
}
.my-swipe .van-swipe-item {
  color: #fff;
  font-size: 20px;
  line-height: 150px;
  text-align: center;
  background-color: #39a9ed;
}
img{
  width: 100%;
}
</style>